package org.vaadin.nf4v.core.handler.impl;

import com.vaadin.ui.Component;
import org.vaadin.nf4v.core.NavigableApplication;
import org.vaadin.nf4v.core.handler.HomePageResolver;

/**
 * Default HomePageResolver implementation.
 * Returns page, marked as home page in configuration.
 */
public class DefaultHomePageResolver implements HomePageResolver {
    
    @Override
    public Class<? extends Component> resolveHomePage(String context) {
        return NavigableApplication.getCurrent().getNavigationConfig().getHomePageClass(context);
    }
}
